package cn.source.common.core.domain.entity;

import cn.hutool.core.date.DateTime;
import cn.source.common.annotation.Excel;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.data.annotation.Transient;

import java.util.Date;

public class Customer {
    private static final long serialVersionUID = 1L;

    /**
     * 序号
     */
    private Long num;

    /**
     * 客户公司名称
     */
    @Excel(name="公司名称")
    private String companyName;

    /**
     * 联系人
     */
    @Excel(name = "联系人")
    private String contactName;

    /**
     * 联系电话
     */
    @Excel(name="联系电话")
    private String phone;

    /**
     * 电子邮件
     */
    @Excel(name="电子邮件")
    private String email;

    /**
     * 客户所在地区
     */
    private Long area;

    /**
     * 客户地址
     */
    @Excel(name="地址")
    private String address;

    /**
     * 是否正式客户(0:否,1:是)
     */
    @Excel(name = "正式客户", readConverterExp = "0=否,1=是")
    private Integer isFormalCust;

    /**
     * 是否启用(0:否,1:是)
     */
    @Excel(name = "是否启用", readConverterExp = "0=否,1=是")
    private Integer isEnabled;

    /**
     * 服务日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "服务日期",dateFormat="yyyy-MM-dd")
    private Date serviceDate;

    /**
     * 备注
     */
    @Excel(name="备注")
    private String remark;

    /**
     * 创建者
     */
    private String createBy;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 更新者
     */
    private String updateBy;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 地区对应的祖级名称
     */
    @Transient
    @Excel(name="地区")
    private String ancestorNames;

    public Customer() {
    }

    public Long getNum() {
        return num;
    }

    public void setNum(Long num) {
        this.num = num;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getContactName() {
        return contactName;
    }

    public void setContactName(String contactName) {
        this.contactName = contactName;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public Long getArea() {
        return area;
    }

    public void setArea(Long area) {
        this.area = area;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Integer getIsFormalCust() {
        return isFormalCust;
    }

    public void setIsFormalCust(Integer isFormalCust) {
        this.isFormalCust = isFormalCust;
    }

    public Integer getIsEnabled() {
        return isEnabled;
    }

    public void setIsEnabled(Integer isEnabled) {
        this.isEnabled = isEnabled;
    }

    public Date getServiceDate() {
        return serviceDate;
    }

    public void setServiceDate(Date serviceDate) {
        this.serviceDate = serviceDate;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "Customer{" +
                "num=" + num +
                ", companyName='" + companyName + '\'' +
                ", contactName='" + contactName + '\'' +
                ", email='" + email + '\'' +
                ", phone='" + phone + '\'' +
                ", area=" + area +
                ", address='" + address + '\'' +
                ", isFormalCust=" + isFormalCust +
                ", isEnabled=" + isEnabled +
                ", serviceDate=" + serviceDate +
                ", remark='" + remark + '\'' +
                ", createBy='" + createBy + '\'' +
                ", createTime=" + createTime +
                ", updateBy='" + updateBy + '\'' +
                ", updateTime=" + updateTime +
                '}';
    }

    public String getAncestorNames() {
        return ancestorNames;
    }

    public void setAncestorNames(String ancestorNames) {
        this.ancestorNames = ancestorNames;
    }
}
